using System;
using System.Collections.Generic;
using NUnit.Framework;
using SharpTestsEx;

namespace AltNetHispano.Vale.Tests
{
	public class EnumerableExtensionsNotEmptyStringsTests
	{
		[Test]
		public void WhenNullThenThrow()
		{
			((IEnumerable<string>) null).Executing(x => x.GetNotEmptyStrings()).Throws<ArgumentNullException>();
		}

		[Test]
		public void WhenEmptyListThenReturnEmptyList()
		{
			(new string[0]).GetNotEmptyStrings().Should().Be.Empty();
		}

		[Test]
		public void WhenListHasNullOrEmptyThenCleanIt()
		{
			(new string[] { "", null, "message" }).GetNotEmptyStrings().Should().Have.SameValuesAs("message");
		}
	}
}